---
layout: "default"
title: "Process"
description: "Swift documentation for 'Process': Command-line arguments for the current process."
keywords: "Process,enum,swift,documentation,argc,arguments,unsafeArgv"
root: "/v3.0"
---

<div class="intro-declaration"><code class="language-swift">enum Process</code></div>

<div class="discussion comment">
    <p>Command-line arguments for the current process.</p>
</div>

<table class="standard">



<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>



<h3>Static Variables</h3>
<div class="declaration" id="static-var-argc_-cint">
<a class="toggle-link" data-toggle="collapse" href="#comment-static-var-argc_-cint">static var argc: CInt</a><div class="comment collapse" id="comment-static-var-argc_-cint"><div class="p">
    <p>Access to the raw argc value from C.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static var argc: CInt { get }</code>

    </div></div>
</div>
<div class="declaration" id="static-var-arguments_-string">
<a class="toggle-link" data-toggle="collapse" href="#comment-static-var-arguments_-string">static var arguments: [String]</a><div class="comment collapse" id="comment-static-var-arguments_-string"><div class="p">
    <p>Access to the swift arguments, also use lazy initialization of static
properties to safely initialize the swift arguments.</p>

<p>NOTE: we can not use static lazy let initializer as they can be moved
around by the optimizer which will break the data dependence on argc
and argv.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static var arguments: [String] { get }</code>

    </div></div>
</div>
<div class="declaration" id="static-var-unsafeargv_-unsafemutablepointer-unsafemutablepointer-int8">
<a class="toggle-link" data-toggle="collapse" href="#comment-static-var-unsafeargv_-unsafemutablepointer-unsafemutablepointer-int8">static var unsafeArgv: UnsafeMutablePointer&lt;UnsafeMutablePointer&lt;Int8&gt;?&gt;</a><div class="comment collapse" id="comment-static-var-unsafeargv_-unsafemutablepointer-unsafemutablepointer-int8"><div class="p">
    <p>Access to the raw argv value from C. Accessing the argument vector
through this pointer is unsafe.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static var unsafeArgv: UnsafeMutablePointer&lt;UnsafeMutablePointer&lt;Int8&gt;?&gt; { get }</code>

    </div></div>
</div>






